;Assembler header file for OSWord
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:54 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 7 Sept 1995

        [       :LNOT: :DEF: OSWord_Hdr
        GBLS    OSWord_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
OSWordReadClock_OpLocalString   *       &0
OSWordReadClock_OpLocalBCD      *       &1
OSWordReadClock_OpConvertBCDToString *       &2
OSWordReadClock_OpUTC           *       &3
OSWordWriteClock_OpTimeLocalString *       &8
OSWordWriteClock_OpDateLocalString *       &F
OSWordWriteClock_OpLocalString  *       &18
OSWordPointer_OpDefine          *       &0
OSWordPointer_OpSetBBox         *       &1
OSWordPointer_OpStep            *       &2
OSWordPointer_OpSetPosition     *       &3
OSWordPointer_OpReadPosition    *       &4
OSWordPointer_OpSetUnlinkedPosition *       &5
OSWordPointer_OpReadUnlinkedPosition *       &6
OSWord_CharDefinitionECF1       *       &02
OSWord_CharDefinitionECF2       *       &03
OSWord_CharDefinitionECF3       *       &04
OSWord_CharDefinitionECF4       *       &05
OSWord_CharDefinitionDotDashPattern *       &06

;Symbols for structure offsets and sizes
                                ^       0
                                #       Byte
OSWordReadClock_Op              *       @

                                ^       0
                                #       Byte
OSWordWriteClock_Op             *       @

                                ^       0
                                #       Byte
OSWordPointer_Op                *       @

                                ^       0
OSWord_LineBlock_line           #       Short
OSWord_LineBlock_size           #       Byte
OSWord_LineBlock_min_char       #       Byte
OSWord_LineBlock_max_char       #       Byte
OSWord_LineBlock                *       @

                                ^       0
OSWord_TimerBlock_b             #       5*Byte
OSWord_TimerBlock               *       @

                                ^       0
OSWord_GCOLBlock_x              #       Short
OSWord_GCOLBlock_y              #       Short
OSWord_GCOLBlock_gcol           #       OS_GCOL
OSWord_GCOLBlock                *       @

                                ^       0
OSWord_CharDefinitionBlock_c    #       Char
OSWord_CharDefinitionBlock_definition #       8*Byte
OSWord_CharDefinitionBlock      *       @

                                ^       0
OSWord_PaletteBlock_gcol        #       OS_GCOL
OSWord_PaletteBlock_colour_number #       Byte
OSWord_PaletteBlock_r           #       Byte
OSWord_PaletteBlock_g           #       Byte
OSWord_PaletteBlock_b           #       Byte
OSWord_PaletteBlock             *       @

                                ^       0
OSWord_CursorPositionBlock_xprev #       Short
OSWord_CursorPositionBlock_yprev #       Short
OSWord_CursorPositionBlock_x    #       Short
OSWord_CursorPositionBlock_y    #       Short
OSWord_CursorPositionBlock      *       @

                                ^       0
OSWordReadClock_LocalStringBlock_op #       OSWordReadClock_Op
                                ^       0
OSWordReadClock_LocalStringBlock_string_c #       Char
OSWordReadClock_LocalStringBlock *       @

                                ^       0
OSWordReadClock_LocalBCDBlock_op #       OSWordReadClock_Op
                                ^       0
OSWordReadClock_LocalBCDBlock_date_and_time #       OS_BCDDateAndTime
OSWordReadClock_LocalBCDBlock   *       @

                                ^       0
OSWordReadClock_ConvertBCDToStringBlock_bcd_op #       OSWordReadClock_Op
OSWordReadClock_ConvertBCDToStringBlock_bcd_date_and_time #       OS_BCDDateAndTime
                                ^       0
OSWordReadClock_ConvertBCDToStringBlock_string_c #       Char
OSWordReadClock_ConvertBCDToStringBlock *       @

                                ^       0
OSWordReadClock_UTCBlock_op     #       OSWordReadClock_Op
                                ^       0
OSWordReadClock_UTCBlock_utc    #       OS_DateAndTime
OSWordReadClock_UTCBlock        *       @

                                ^       0
OSWordWriteClock_Block_op       #       OSWordWriteClock_Op
OSWordWriteClock_Block_string   #       Char
OSWordWriteClock_Block          *       @
        
        MACRO
$label                          OSWordWriteClock_Block_MEMBERS
$label._op                      #       OSWordWriteClock_Op
        MEND
        
                                ^       0
OSWordWriteClock_BlockBase      OSWordWriteClock_Block_MEMBERS
OSWordWriteClock_BlockBase      *       @

                                ^       0
OSWordPointer_DefineBlock_reserved #       2*Byte
OSWordPointer_DefineBlock_op    #       OSWordPointer_Op
OSWordPointer_DefineBlock_shape_no #       Byte
OSWordPointer_DefineBlock_width #       Byte
OSWordPointer_DefineBlock_height #       Byte
OSWordPointer_DefineBlock_xactive #       Byte
OSWordPointer_DefineBlock_yactive #       Byte
OSWordPointer_DefineBlock_data  #       Ptr
OSWordPointer_DefineBlock       *       @

                                ^       0
OSWordPointer_BBoxBlock_reserved #       3*Byte
OSWordPointer_BBoxBlock_op      #       OSWordPointer_Op
OSWordPointer_BBoxBlock_x0      #       Short
OSWordPointer_BBoxBlock_y0      #       Short
OSWordPointer_BBoxBlock_x1      #       Short
OSWordPointer_BBoxBlock_y1      #       Short
OSWordPointer_BBoxBlock         *       @

                                ^       0
OSWordPointer_StepBlock_op      #       OSWordPointer_Op
OSWordPointer_StepBlock_xstep   #       Byte
OSWordPointer_StepBlock_ystep   #       Byte
OSWordPointer_StepBlock         *       @

                                ^       0
OSWordPointer_PositionBlock_reserved #       Byte
OSWordPointer_PositionBlock_op  #       OSWordPointer_Op
OSWordPointer_PositionBlock_x   #       Short
OSWordPointer_PositionBlock_y   #       Short
OSWordPointer_PositionBlock     *       @

                                ^       0
OSWord_ScreenBaseBlock_reserved #       3*Byte
OSWord_ScreenBaseBlock_type     #       Byte
OSWord_ScreenBaseBlock_base     #       Ptr
OSWord_ScreenBaseBlock          *       @

                                ^       0
OSWord_Block_line               #       OSWord_LineBlock
                                ^       0
OSWord_Block_timer              #       OSWord_TimerBlock
                                ^       0
OSWord_Block_gcol               #       OSWord_GCOLBlock
                                ^       0
OSWord_Block_char_definition    #       OSWord_CharDefinitionBlock
                                ^       0
OSWord_Block_palette            #       OSWord_PaletteBlock
                                ^       0
OSWord_Block_cursor_position    #       OSWord_CursorPositionBlock
                                ^       0
OSWord_Block_string             #       OSWordReadClock_LocalStringBlock
                                ^       0
OSWord_Block_bcd                #       OSWordReadClock_LocalBCDBlock
                                ^       0
OSWord_Block_convert_bcd_to_string #       OSWordReadClock_ConvertBCDToStringBlock
                                ^       0
OSWord_Block_utc                #       OSWordReadClock_UTCBlock
                                ^       0
OSWord_Block_write_clock        #       OSWordWriteClock_Block
                                ^       0
OSWord_Block_pointer_define     #       OSWordPointer_DefineBlock
                                ^       0
OSWord_Block_pointer_bbox       #       OSWordPointer_BBoxBlock
                                ^       0
OSWord_Block_pointer_step       #       OSWordPointer_StepBlock
                                ^       0
OSWord_Block_pointer_position   #       OSWordPointer_PositionBlock
                                ^       0
OSWord_Block_screen_base        #       OSWord_ScreenBaseBlock
                                ^       0
OSWord_Block_reserved           #       64*Char
OSWord_Block                    *       @


;Symbols for SWI's and SWI reason codes
XOS_Word                        *       &20007
OS_Word                         *       &7

OSWord_ReadLine                 *       &0

OSWord_ReadSystemClock          *       &1
   ;Entry
   ;  R0 = &1
   ;  R1 = clock (pointer to OSWord_TimerBlock)

OSWord_WriteSystemClock         *       &2
   ;Entry
   ;  R0 = &2
   ;  R1 -> clock (OSWord_TimerBlock)

OSWord_ReadIntervalTimer        *       &3
   ;Entry
   ;  R0 = &3
   ;  R1 = timer (pointer to OSWord_TimerBlock)

OSWord_WriteIntervalTimer       *       &4
   ;Entry
   ;  R0 = &4
   ;  R1 -> timer (OSWord_TimerBlock)

OSWord_ReadIOSpace              *       &5

OSWord_WriteIOSpace             *       &6

OSWord_Sound                    *       &7

OSWord_Envelope                 *       &8

OSWord_ReadGCOL                 *       &9

OSWord_ReadCharDefinition       *       &A
   ;Entry
   ;  R0 = &A
   ;  R1 = definition (pointer to OSWord_CharDefinitionBlock)

OSWord_ReadPalette              *       &B
   ;Entry
   ;  R0 = &B
   ;  R1 = entry (pointer to OSWord_PaletteBlock)

OSWord_WritePalette             *       &C
   ;Entry
   ;  R0 = &C
   ;  R1 -> entry (OSWord_PaletteBlock)

OSWord_ReadCursorPosition       *       &D
   ;Entry
   ;  R0 = &D
   ;  R1 = position (pointer to OSWord_CursorPositionBlock)

OSWord_ReadClock                *       &E

OSWordReadClock_LocalString     *       &E
   ;Entry
   ;  R0 = &E
   ;  R1 = string (pointer to OSWordReadClock_LocalStringBlock)

OSWordReadClock_LocalBCD        *       &E
   ;Entry
   ;  R0 = &E
   ;  R1 = bcd (pointer to OSWordReadClock_LocalBCDBlock)

OSWordReadClock_ConvertBCDToString *       &E
   ;Entry
   ;  R0 = &E
   ;  R1 = convert_bcd_to_String (pointer to OSWordReadClock_ConvertBCDToStringBlock)

OSWordReadClock_UTC             *       &E
   ;Entry
   ;  R0 = &E
   ;  R1 = utc (pointer to OSWordReadClock_UTCBlock)

OSWord_WriteClock               *       &F

OSWordWriteClock_TimeLocalString *       &F
   ;Entry
   ;  R0 = &F
   ;  R1 = time (pointer to OSWordWriteClock_Block)

OSWordWriteClock_DateLocalString *       &F
   ;Entry
   ;  R0 = &F
   ;  R1 = date (pointer to OSWordWriteClock_Block)

OSWordWriteClock_DateAndTimeLocalString *       &F
   ;Entry
   ;  R0 = &F
   ;  R1 = date_and_time (pointer to OSWordWriteClock_Block)

OSWord_EconetTransmit           *       &10

OSWord_EconetReceive            *       &11

OSWord_EconetMiscOp             *       &12

OSWord_EconetImmediateOp        *       &13

OSWord_EconetFSOp               *       &14

OSWord_Pointer                  *       &15

OSWordPointer_Define            *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 = &2 + define (pointer to OSWordPointer_DefineBlock)

OSWordPointer_SetBBox           *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 = &3 + bbox (pointer to OSWordPointer_BBoxBlock)

OSWordPointer_Step              *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 -> step (OSWordPointer_StepBlock)

OSWordPointer_SetPosition       *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 = &1 + pos (pointer to OSWordPointer_PositionBlock)

OSWordPointer_ReadPosition      *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 = &1 + pos (pointer to OSWordPointer_PositionBlock)

OSWordPointer_SetUnlinkedPosition *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 = &1 + pos (pointer to OSWordPointer_PositionBlock)

OSWordPointer_ReadUnlinkedPosition *       &15
   ;Entry
   ;  R0 = &15
   ;  R1 = &1 + pos (pointer to OSWordPointer_PositionBlock)

OSWord_WriteScreenBase          *       &16
   ;Entry
   ;  R0 = &16
   ;  R1 = &3 + screen_base (pointer to OSWord_ScreenBaseBlock)

WordV                           *       &7

        ]
        END
